const web = require("../../module/web"), loger = require("../../module/loger");

module.exports.run = ()=>{
	web.run((w)=>{
		let lt = w.window.document.getElementsByClassName("loginTag")
		if(lt && lt[0]){
			let bq = lt[0].getElementsByTagName("a");
			for(let i=0;i<bq.length;i++){
				if(bq[i].innerHTML.indexOf("注册手机邮箱") > 0){
					bq[i].click();
					break;
				}
			}
		} 
		let fm = w.window.document.getElementsByName("frm_reg_tel");
		if(fm && fm[0]){
			fm = fm[0];
			fm.email.value = global.sdObj.ud[3];
			fm.psw.value = global.sdObj.ud[10];
			
			//点击获取手机短信按钮
			let inp = w.window.document.getElementsByClassName("freeTelCode");
			if(inp && inp[0]) inp[0].click();
		}
	},(w)=>{
		global.sdObj.end = 0;
		return true;
	});
}